package com.lyl.domaindemo.Infrastructure.utils;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;

/**
 * @author lyl
 * @date 2023/5/27
 */
public class DateUtil {

    /**
     * date转LocalDateTime
     * @param date
     * @return
     */
    public static LocalDateTime getLocalDateTime(Date date){
        ZoneId zoneId = ZoneId.systemDefault();
        return date.toInstant().atZone(zoneId).toLocalDateTime();
    }
}
